package com.itheima.mytext11;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo {

    public static void main(String[] args) {

        //定义一个有界阻塞队列
        ArrayBlockingQueue<String> queue =new ArrayBlockingQueue<>(1);

        Cook t1 = new Cook(queue);
        Foodie t2 = new Foodie(queue);

        t1.start();
        t2.start();

    }
}
